<template>
  <div>
    <input type="text" v-model="user.account"><br>
    <input type="text" v-model="user.pwd"><br>
    <button @click="login()">登录</button>
  </div>
</template>
<script>
export default{
  data(){
    return{
      user:{
        account:'',
        pwd:''
      }
    }
  },
  methods:{
    login:function(){
      //以json格式字符串提交的
      this.axios.post(this.baseUrl+"user/login",this.user)
        .then(res => {
          console.log(res);
        })
    }
  }
}
</script>